import request from "./request";


//分页获取图书列表
export function searchAllLoadApi( ) {
    return request({
        url: '/t-history/getlendremember' ,
        method: 'get',
    })
}

//查询一个
export function getOneByIdApi(id: any) {
    return request({
        url: '/api/admin/sys/custom/field/detail/' + id,
        method: 'get',
    })
}


//插入图书
export function addApi(data: any) {
    return request({
        url: "/tbook/insertbook",
        method: 'post',
        data
    })
}

//根据图书id更新图书
export function editApi(data: any) {
    return request({
        url: "/tbook/updatebookbyid",
        method: 'post',
        data
    })
}


export function returnApi(id: any) {
    return request({
        url: "/t-history/borrowbook/" + id,
        method: 'POST',
    })
}